Skip to content

[build] extend the EngFlow cache for GHA to Rust - #18332

Merged
titusfortner merged 1 commit into
SeleniumHQ:trunkfrom
titusfortner:rust-remote-cache
Nov 17, 2026
Merged

titusfortner merged 1 commit into
SeleniumHQ:trunkfrom
titusfortner:rust-remote-cache

Conversation

@titusfortner

Copy link
Copy Markdown
Member

🔗 Related Issues

Follow-up to #18331

💥 What does this PR do?

  • Enables the EngFlow remote cache for the Rust (Selenium Manager) smoke tests; the current Affected Targets implementation runs Rust tests much more frequently than necessary, so this should have a big impact on reducing time of execution
  • Adds macOS Rust smoke tests to trunk push/merge

🔧 Implementation Notes

  • macOS and Linux build with downloaded toolchains and SDKs only, and two clean macOS builds were byte-identical.
  • Windows uses the runner's MSVC, but its versioned paths are in the cache keys, so image updates cause misses rather than stale hits.
  • macOS needs to run on trunk pushes because those are the only cache writers.

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Claude Opus 5.5)
    • What was generated: the hermeticity, determinism and CI timing analysis, the workflow change, and this description
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

  • Follow-on PR to make --manager=host the default for binding tests so they use these cached builds instead of the pinned download
  • Follow-on PR to try --experimental_remote_repo_contents_cache on the Rust job, so its toolchains and crates come from EngFlow instead of the GitHub repository cache

🔄 Types of changes

  • New feature (CI only)

@selenium-ci

Copy link
Copy Markdown
Member

/agentic_describe

@selenium-ci

Copy link
Copy Markdown
Member

/agentic_review

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Nov 17, 2026
@qodo-code-review

qodo-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Enable EngFlow caching for Rust CI and run macOS tests on trunk

⚙️ Configuration changes ✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Enable EngFlow remote caching for Rust smoke tests to reduce repeated Bazel work.
• Run macOS Rust tests on trunk pushes so they can populate the cache.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The changed workflow schedules and executes the end-to-end Rust test validation behavior.
  • The shared Bazel workflow and EngFlow cache are propagation hops within that same CI integration, not independent product capabilities.
  • Adding macOS changes the operating-system surface of the same Rust test-validation integration.
  • It does not create an independent product feature or functional scope.
Sources

.github/workflows/ci-rust.yml[9-9]

  packages: read

.github/workflows/ci-rust.yml[23-23]

      remote-cache: true
Behavioral complexity 🟡 Medium 🧩 Compatibility cases

  • Before: Rust CI did not pass remote-cache=true from this workflow, so its Bazel invocation did not request the remote cache through this path.
  • After: all applicable non-scheduled Rust CI matrix jobs use the shared remote-cache configuration, while scheduled runs remain excluded by the shared workflow condition.
  • New correctness condition: the GitHub permission, EngFlow credential helper, cache service, and platform-specific Bazel invocation must remain compatible across macOS, Ubuntu ARM, and Windows; a rejected credential is an explicit build failure rather than a local-cache fallback.
  • The cache protocol and helpers are established infrastructure, but this change newly enables that compatibility path for Rust CI.
Sources

.github/workflows/ci-rust.yml[23-23]

      remote-cache: true

.github/workflows/ci-rust.yml[9-9]

  packages: read
Potential damage 🟡 Medium 🩹 Temporary loss

  • The affected capability is CI validation, not a shipped runtime feature.
  • A cache authentication or service failure can block completion of Rust validation, but rerunning after restoring token scope or cache availability restores the capability; no product data or external customer state is changed.
  • Recoverable by correcting repository/workflow permission or cache service availability and rerunning the workflow.
  • Reverting the workflow change restores the prior local/non-remote-cache execution path, but does not automatically repair an already failed run.
Sources

.github/workflows/ci-rust.yml[23-23]

      remote-cache: true

.github/workflows/ci-rust.yml[9-9]

  packages: read
Assessed commit 992aa17 > Snapshot assessment: the current PR revision could not be verified.
Diagram

graph TD
  CI["CI events"] --> Matrix["Rust OS matrix"] --> Bazel["Shared Bazel workflow"] --> Tests["Rust tests"]
  Bazel -->|PR reads; trunk writes| Cache[("EngFlow cache")]
Loading
High-Level Assessment

Use the existing shared Bazel remote-cache option rather than adding Rust-specific cache setup. Including macOS on trunk pushes provides a cache writer for that platform, with additional runner usage as the tradeoff.

Files changed (1) +2 / -3

Other (1) +2 / -3
ci-rust.ymlEnable Rust remote caching and macOS trunk runs +2/-3

Enable Rust remote caching and macOS trunk runs

• Grants package-read permission and enables the shared Bazel workflow’s EngFlow cache option for Rust tests. Removes the push-event macOS exclusion, allowing trunk pushes to run and populate macOS cache entries.

.github/workflows/ci-rust.yml

@qodo-code-review

qodo-code-review Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Rust checks can pass during download outages ✗ Dismissed
Description
remote-cache: true allows Bazel to reuse a passing result for //rust/tests:integration, whose
browser and Grid tests depend on live downloads that are not declared test inputs. After a trunk run
populates the cache, a pull-request run with unchanged test inputs can pass without checking whether
those downloads still work.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #18331
Review mode: Auto: ⚖️ Balanced: CI caching and permissions changes carry meaningful operational risk.

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/ci-rust.yml Resolved
@titusfortner
titusfortner merged commit 6ed471b into SeleniumHQ:trunk Nov 17, 2026
27 checks passed
This was referenced Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants